package com.system.user.dao;

import com.system.user.entity.UserEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author HYXK
 * @email null@qq.com
 * @date 2020-03-27 11:55:11
 */
@Mapper
@Repository
public interface UserDao {

    List<UserEntity> selectUser();

    UserEntity selectUserByUsername(String username);

    List<String> selectOpenIDByBNumber(String bNumber);

    int adminRegister(@Param("username") String username, @Param("password") String password);

    int weiXinRegister(@Param("username") String username, @Param("openid") String openid);

    UserEntity adminLogin(@Param("username") String username, @Param("password") String password);

    UserEntity weiXinLogin(@Param("openid") String openid);

    int updateUser(UserEntity userEntity);

    int deleteUser(@Param("id") Integer id);

}
